闲暇时间学习学习HTML相关知识————HTML之DIV布局

#HTML DIV布局

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!Doctype html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>div布局</title>
<style type="text/css">
body{
margin:0px;
}
#container{
width:100%;
height:950px;
background-color:gray;
}
#heading{
width:100px;
height:10%;
background-color:green;
}

#content_menu{
width:30%;
height:80%;
background-color:red;
float:left;
}
#content_body{
width:70%;
height:80%;
background-color:blue;
float:left;
}
#footing{
width:100px;
height:10%;
background-color:pink;
clear:float;
}
</style>
</head>
<div id="container">
<div id="heading">头部</div>
<div id="content_menu">内容菜单</div>
<div id="content_body">内容主体</div>
<div id="footing">底部</div>
</div>
</html>

最后更新: 2018年09月26日 11:32

原始链接: http://yoursite.com/2015/02/07/HTML5/HTML DIV/

× 请我吃糖~
打赏二维码